package com.study.spring.mybatisCursor;

import com.study.spring.mybatisCursor.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.cursor.Cursor;
import org.apache.ibatis.mapping.ResultSetType;

/**
 * @author
 * @date 2021年11月14日 21:09
 * @description
 */
@Mapper
public interface FooMapper {


    @Options(resultSetType = ResultSetType.FORWARD_ONLY)
    @Select("select * from user limit #{limit}")
    Cursor<User> scan(@Param("limit") int limit);
}
